home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
gnu
/
m4-1_0_3.lha
/
m4-1.0.3
/
checks
/
check_them
< prev
next >
Wrap
Text File
|
1992-12-19
|
935b
|
50 lines
#!/bin/sh
# Check GNU m4 against examples from the manual source.
# Copyright (C) 1992 Free Software Foundation, Inc.
out=/tmp/m4-out.$$
err=/tmp/m4-err.$$
xout=/tmp/m4-xout.$$
xerr=/tmp/m4-xerr.$$
trap "rm -f $out $err $xout $xerr; exit 1" 1 2 3 14 15
for file
do
echo "Checking $file"
../m4 -d $file >$out 2>$err
sed -e '/^dnl @result{}/!d' -e 's///' $file > $xout
if cmp -s $out $xout; then
:
else
failed="$failed $file:out"
echo `sed -e 's/^dnl //' -e 1q $file`
echo "$file: stdout mismatch"
diff $out $xout
fi
sed -e '/^dnl @error{}/!d' -e 's///' $file > $xerr
if cmp -s $err $xerr; then
:
else
failed="$failed $file:err"
echo `sed -e 's/^dnl //' -e 1q $file`
echo "$file: stderr mismatch"
diff $err $xerr
fi
done
rm -f $out $err $xout $xerr
echo
if test -z "$failed"; then
echo "All checks successful"
else
echo "Failed checks were:"
echo " $failed"
fi